<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="tag" uri="/WEB-INF/tld/tag.tld"%>
<tag:usuariosListar retorno="usuarios"  />
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="inc/include-head.jsp" flush="true" />
<title>Usu&aacute;rios</title>
</head>
<body>
	<jsp:include page="inc/include-topo.jsp" flush="true" />
<div class="conteudo">
<div class="col-sm-4">&nbsp;</div> 
<div class="col-sm-4">
    <div class="panel-group" id="accordion">
		<c:forEach var="u" items="${usuarios }">
		
		
		
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#usuario${u.id }">
          <c:out value="${u.nome }" />
        </a>
        <a class="exclui-usuario" href="<tag:enderecoSite/>excluir-usuario.do?id=${u.id}">
          	<span class="glyphicon glyphicon-remove"></span>
        </a>
        <a class="edita-usuario" href="<tag:enderecoSite restrito="true"/>usuario-form.do?id=${u.id }">
          	<span class="glyphicon glyphicon-pencil"></span>
        </a>
      </h4>
    </div>
    
    <div id="usuario${u.id }" class="panel-collapse collapse">
      <div class="panel-body">
          <div class="highlight col-sm-12">Nome: <c:out value="${u.nome }" /></div>
          <div class="highlight col-sm-12">E-mail: <c:out value="${u.email }" /></div>
          <div class="highlight col-sm-12">Login: <c:out value="${u.login }" /></div>
          
          <div class="table-responsive">
          	<table class="table table-hover">
          	   <thead><tr><th colspan="2">Permiss&otilde;es</th></tr></thead>
          	   <tbody>
           	     <c:forEach items="${u.permissoes }" var="p">
           	     <tr>
          	  	  <td><c:out value="${p.nome }" /></td>
          	     </tr>
           	     </c:forEach>
          	  </tbody>
          	</table>
          </div>
      </div>
    </div>
  </div>
  
		
	</c:forEach>
</div>
</div> 
<div class="col-sm-4">&nbsp;</div> 
</div>
</body>
</html>